Many software-based products generate text-based logs of various operational details, such as errors, for a purpose of monitoring computer systems and also for employment as an aid in trouble-shooting these systems. These software-based products can provide an ability to adjust an amount of operational details logged.
A typical approach to generate an amount of data to be logged (“log data”) employs use of a “print” statement, such as “fprintf” in the “C” programming language, in source code. These print statements specify both as what data gets logged, including static (non-variable) and dynamic (runtime variable) data, and also further include the format in which the log data is to be printed. These approaches can require significant system processing time and storage.
One method of reducing storage required for these logs is to utilize common compression tools (e.g., “compress”, “gzip”, “winzip”) to compress the text data, generated by the print statements, after it has been generated. This solution may help with the storage of the log data, but is actually more expensive in terms of computer time, since the compression adds an additional processing step.
An approach to reducing the amount of data logged is to generate a key to represent the static data, such as an arbitrary but unique number, and log the key and dynamic data values instead of the original text log data. For instance, an “fprintf(“error in Memory Area % d”, errNo)” where the format string “error in Memory Area % d” and the name, type, and size of the variable “errNo” would be keyed as a key 4678 to represent the static information, and the current value associated with the name “errNo” is dynamic and is generated at runtime and had the value 53 at runtime. 4678, 53 would then be output to an error log in binary form.
Thus, the generation of log data is useful in monitoring and trouble-shooting computer systems. Accordingly, improvements and generating and recording log data would be beneficial.